package main;

import processing.core.PApplet;

public class Loop extends PApplet {

    float y = 180;

    // The statements in the setup() function
// run once when the program begins
    @Override
    public void settings() {
        size(640, 360);  // Size should be the first statement

    }

    @Override
    public void draw() {

        stroke(255);     // Set stroke color to white
        //noLoop();

        background(0);  // Set the background to black
        line(0, y, width, y);
        y = y - 1;
        if (y < 0) {
            y = height;
        }
    }

    @Override
    public void mousePressed() {
        loop();
    }
}
